package org.example.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.entity.ClassEntity;

import java.util.List;
import java.util.Map;

@Mapper
public interface ClassesMapper {
    int insertClass(ClassEntity classEntity);

    List<ClassEntity> queryClassesByClassid(@Param("classid") String classid);

    int chooseClass(@Param("schoolid") String schoolid,
                    @Param("classid") String classid);

    List<Map<String, Object>> queryStudentClass(@Param("schoolid") String schoolid);

    List<Map<String, Object>> queryTeacherClass(@Param("schoolid") String schoolid);

    ClassEntity queryClass(@Param("classid") String classid);

    int updateToAudit(@Param("classid") String classid,
                      @Param("schoolid") String schoolid);

}
